var RunLayer02 = cc.Layer.extend({
	backgroundLayer : null,
	mainLayar : null,
	ctor:function () {
		this._super();
		this.initFrames();
		this.loadBackground();
		this.loadMainLayer();
	},
	initFrames : function(){
		cc.spriteFrameCache.addSpriteFrames(res_run02.run_p);
	},
	loadBackground : function(){
		this.backgroundLayer = new RunBackgroundLayer();
		this.addChild(this.backgroundLayer);
	},
	loadMainLayer : function(){
		this.mainLayar = new RunMainLayer();
		this.addChild(this.mainLayar);
	}
});

var RunScene02 = PScene.extend({
	onEnter:function () {
		this._super();
		this.initTeach();
		var layer = new RunLayer02();
		this.addChild(layer);
	},
	initTeach:function(){
		gg.expId = 5;
		gg.lastStep = 1;
		gg.userId = 1;
		gg.expVer = 3;
		gg.version = '';
		// 初始化游戏参数
		gg.begin_time = new Date();
		gg.score = 0;
		gg.errorStep = 0;// 错误步数
		gg.oneSure = 0;// 一次正确的步数
		gg.errFlag = false;
		gg.teachFlow = teachFlow02;
		gg.totalStep = gg.teachFlow.length;
		gg.flow = new TeachFlow();
	}
});
